
<?php     
    /*
      |————————————————————————–
      | Application Routes
      |————————————————————————–
      |
      | Here is where you can register all of the routes for an application.
      | It's a breeze. Simply tell Laravel the URIs it should respond to
      | and give it the Closure to execute when that URI is requested.
      |
     */
     
   Route::get('/', array(
         'as'   => 'home',
         'uses' => 'UserController@home'));

   Route::get('signup', array(
         'as'   =>'signup',
         'uses' =>'UserController@signup'));

  Route::get('activate/{code}', array(
         'as'   =>'activate',
         'uses' =>'UserController@activate'));


    Route::get('forgot', array(
         'as'   =>'forgot',
         'uses' =>'UserController@forgot'));

   Route::get('login', array(
         'as'   =>'login',
         'uses' =>'UserController@login'));

    Route::get('recover/{code}', array(
         'as'   =>'recover',
         'uses' =>'UserController@recover'));

     Route::get('rtpass', array(
         'as'   =>'rtpass',
         'uses' =>'UserController@rtpass'));
  
   
  

 Route::group(array('before' => 'csrf'), function(){ 

  Route::post('postForgot','UserController@postForgot');  
  Route::post('postCreate','UserController@postSignup');  
  Route::post('postSignin','UserController@postSignin'); 
 
  });

 /*
   auth section 
 */

    Route::group(array('before' => 'auth'), function()
    {

         Route::get('signout', array(
         'as'   =>'signout',
         'uses' =>'UserController@signout'));
        

        Route::get('company/create', array(
         'as'   =>'company/create',
         'uses' =>'ProfileController@create'));

         Route::get('company/{company_id}', array(
         'as'   =>'company',
         'uses' =>'ProfileController@company'));


         Route::get('profile/{user_id}', array(
         'as'   =>'profile',
         'uses' =>'ProfileController@profile'));

        Route::get('message/{id}', array(
         'as'   =>'message',
         'uses' =>'MessageController@message'));

    

    

        


       Route::group(array('before' => 'csrf'), function(){ 

          Route::post('postEditprofile','ProfileController@postEditprofile');  
          Route::post('postRtpass','UserController@postRtpass');  
          Route::post('postCreateCompany','ProfileController@postCreateCompany');  



        });

          Route::group(array('before' => 'admin'), function()
         {
            Route::get('admin', array(
             'as'   =>'admin',
             'uses' =>'AdminController@index'));
			 
			    Route::get('admin/user', array(
             'as'   =>'admin/user',
             'uses' =>'AdminController@getUser')); 

          Route::get('admin/userdelete/{user_id}', array(
             'as'   =>'admin/userdelete',
             'uses' =>'AdminController@getUserdelete')); 

          Route::get('admin/userblock/{user_id}', array(
             'as'   =>'admin/userblock',
             'uses' =>'AdminController@getUserblock')); 

            Route::get('admin/network', array(
             'as'   =>'admin/network',
             'uses' =>'AdminController@getNetwork')); 
		 
			 
			 
        });
    });

Route::get('intro', function()
{
    return View::make('intro');
});




//test area

   // Route::get('user/{name}', 'UserController@sendEmail');
